package com.dao.lx;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.entity.Datetype;

public interface DatetypeDAO extends CrudRepository<Datetype, Long>{
	@Query("from Datetype d where d.datetypeClassify like ?1 and d.datetypeIfdelete = 1")
	public List<Datetype> queryByDatetypeClassify(String datetypeClassify, Pageable p);
	
	@Query("from Datetype d where d.datetypeClassify like ?1 and d.datetypeIfdelete = 1 and d.datetypeIfopen = 1")
	public List<Datetype> queryByDatetypeClassifyandDatetypeIfopen1(String datetypeClassify, Pageable p);
	
	@Query("from Datetype d where d.datetypeIfdelete = 1")
	public List<Datetype> findAllDatetypeIfdelete1(Pageable p);

	@Query("from Datetype d where d.datetypeClassify like ?1 and d.datetypeIfdelete = 1")
	public List<Datetype> queryByDatetypeClassifyandDatetype(String datetypeClassify, Pageable p);
}
